package com.bblocks.enums.flowCommonBeans;
/**
 * @author : chenHongLai
 * @Description :
 * @Date : created in 2019/6/28 15:10.
 */
public enum FlowRecomStatusEnum {
    OK(1, "正常"),
    INVILID(2, "作废"),
    SINGED(3,"签约"),
    COMPLETE(4,"完成");
    private Integer value;
    private String message;

    public static Integer messageOf(String message) {
        FlowRecomStatusEnum[] values = FlowRecomStatusEnum.values();
        for (FlowRecomStatusEnum statusEnum : values) {
            if (statusEnum.getMessage().equals(message)) {
                return statusEnum.getValue();
            }
        }
        return null;
    }

    public static String valueOf(int value) {
        FlowRecomStatusEnum[] values = FlowRecomStatusEnum.values();
        for (FlowRecomStatusEnum stateEnum : values) {
            if (value == stateEnum.getValue()) {
                return stateEnum.getMessage();
            }
        }
        return null;
    }

    FlowRecomStatusEnum(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public Integer getValue() {
        return value;
    }
    public String getMessage() {
        return message;
    }
}
